package com.zjq.dao;

import com.zjq.pojo.Author;
import com.zjq.pojo.BookKind;
import com.zjq.pojo.Books;
import com.zjq.pojo.Comments;
import org.apache.ibatis.annotations.Param;

import java.awt.print.Book;
import java.util.List;
import java.util.Map;

public interface BookMapper {

    List<Books> queryAllBook();

    List<Books> queryBookByKindId(@Param("bookkindId") int bookkindId);

    Books queryBookById(@Param("bookId") int id);

    int addBook(Books book);

    int deleteBookById(@Param("bookId") int id);

    int updateBook(Books books);

    List<Books> queryBookByName(@Param("bookName") String name);

    int addBookKind(BookKind bookKind);

    List<BookKind> queryBookKind();

    int deleteBookKindById(@Param("kindId") int id);

    List<Books> queryBookByType(@Param("type") int type);

    List<Books> queryBookByKindL(@Param("bookkindId") int id);

    List<Comments> queryCommentsById(@Param("pId") int pId);

    List<Author> queryAuthorByName(@Param("name") String name);

    int addAuthor(Author author);
}
